#ifndef FND_SOUND_BUFFER_MANAGER_HPP
#define FND_SOUND_BUFFER_MANAGER_HPP
#include "ResourceManager.hpp"
#include <boost/shared_ptr.hpp>
#include <stlsoft/shims/access/string.hpp>
#include <sfml/audio.hpp>
namespace FndGame2D {
    class sound_buffer_manager {
    public:
        typedef boost::shared_ptr<sf::SoundBuffer> sound_buffer_type ;
        typedef Manager<std::string, sound_buffer_type> sound_buffer_mgr_impl ;
        typedef sound_buffer_mgr_impl::key_type key_type ;
        typedef sound_buffer_mgr_impl::value_type value_type ;
        template<typename STR>
        bool add_sound_buffer(const key_type& k, STR s) {
            return add_sound_buffer(k, stlsoft::c_str_ptr(s)) ;
        }
        bool add_sound_buffer(const key_type& k, const char* file_name) ;

        bool add_sound_buffer(const key_type& k, value_type v) {
            return m_mgr.add_value(k,v) ;
        }
        bool remove_sound_buffer(const key_type& k) {
            return m_mgr.remove_value(k) ;
        }
        bool has_sound_buffer(const key_type& k) {
            return m_mgr.has_value(k) ;
        }
        const value_type& get_sound_buffer(const key_type& k) const {
            return m_mgr.get_value(k) ;
        }
    private:
        sound_buffer_mgr_impl m_mgr ;
    } ;
}
#endif  // FND_SOUND_BUFFER_MANAGER_HPP
